Skip to content

Conversation

@vsmanish1772
Copy link

@vsmanish1772 vsmanish1772 commented Oct 10, 2025

Description

Protects recently written uncommitted files from deletion during vacuum operations in Full mode to prevent race conditions.

Changes

  • Add physical age check for files not referenced in the Delta log
  • Files younger than retention period are now protected from deletion
  • Add test test_vacuum_full_protects_recent_uncommitted_files

Related Issue(s)

Prevents race condition where concurrent writer's uncommitted files could be deleted before transaction commit, avoiding potential data loss.

Documentation

Added inline comments explaining the race condition protection logic.

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label Oct 10, 2025
@github-actions
Copy link

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@vsmanish1772 vsmanish1772 changed the title fix: Protect recently written uncommitted files in vacuum Full mode fix(rust): protect recent uncommitted files in vacuum full mode Oct 10, 2025
This change prevents race conditions where concurrent writer's uncommitted
files could be deleted before the transaction is committed. Now files that
are not referenced in the log but are younger than the retention period
will be protected from deletion during vacuum operations in Full mode.

Added test to verify the behavior of protecting recent uncommitted files.

Signed-off-by: Manish Sogiyawar <[email protected]>
@vsmanish1772 vsmanish1772 force-pushed the fix-vacuum-race-condition branch from f7305f0 to 838d189 Compare October 10, 2025 09:28
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 93.65079% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.35%. Comparing base (e275f68) to head (57987e3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/operations/vacuum.rs 93.65% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3835      +/-   ##
==========================================
+ Coverage   74.33%   74.35%   +0.01%     
==========================================
  Files         147      147              
  Lines       39607    39648      +41     
  Branches    39607    39648      +41     
==========================================
+ Hits        29442    29479      +37     
- Misses       8775     8779       +4     
  Partials     1390     1390              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rtyler rtyler enabled auto-merge (rebase) October 10, 2025 15:36
@rtyler rtyler merged commit f1727c9 into delta-io:main Oct 10, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binding/rust Issues for the Rust crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants